package com.ag.bean;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.ag.lzw.common.TbOverStatus;


/**
 * TbOverRequest entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_OVER_REQUEST", schema = "dbo", catalog = "AGDB")
public class TbOverRequest implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -1919091297399171247L;
	
	private String toId;
	private TbTask tbTask;
	private String toReason;
	private Date toTime;
	private String toFailue;
	/**
	 * 办结状态ID
	 */
	private TbOverStatus tbOverStatus;
	private String a;
	private String b;
	private String c;

	// Constructors

	/** default constructor */
	public TbOverRequest() {
	}

	/** minimal constructor */
	public TbOverRequest(String toId, String toReason) {
		this.toId = toId;
		this.toReason = toReason;
	}

	/** full constructor */
	public TbOverRequest(String toId, TbTask tbTask, String toReason,
			Date toTime, String toFailue, String a, String b, String c) {
		this.toId = toId;
		this.tbTask = tbTask;
		this.toReason = toReason;
		this.toTime = toTime;
		this.toFailue = toFailue;
		this.a = a;
		this.b = b;
		this.c = c;
	}

	// Property accessors
	@Id
	@Column(name = "TO_ID", unique = true, nullable = false, length = 10)
	public String getToId() {
		return this.toId;
	}

	public void setToId(String toId) {
		this.toId = toId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "T_ID")
	public TbTask getTbTask() {
		return this.tbTask;
	}

	public void setTbTask(TbTask tbTask) {
		this.tbTask = tbTask;
	}

	@Column(name = "TO_REASON", nullable = false, length = 1024)
	public String getToReason() {
		return this.toReason;
	}

	public void setToReason(String toReason) {
		this.toReason = toReason;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "TO_TIME", length = 23)
	public Date getToTime() {
		return this.toTime;
	}

	public void setToTime(Date toTime) {
		this.toTime = toTime;
	}

	@Column(name = "TO_FAILUE", length = 1024)
	public String getToFailue() {
		return this.toFailue;
	}

	public void setToFailue(String toFailue) {
		this.toFailue = toFailue;
	}

	@Column(name = "A", length = 60)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 60)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 60)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TO_STATUS")
	public TbOverStatus getTbOverStatus() {
		return this.tbOverStatus;
	}

	public void setTbOverStatus(TbOverStatus tbOverStatus) {
		this.tbOverStatus = tbOverStatus;
	}
}